#include <reg52.h>
#define uint unsigned int 
#define uchar unsigned char

void delay(uint ms)		  //ÑÓÊ±
{
 uint i,j;
 for(i=ms;i>0;i--)
 for(j=110;j>0;j--);
}
void main(void)
{
	EA=1;				//×ÜÖÐ¶Ï¿ªÆô
  EX0=1;				//Íâ²¿ÖÐ¶Ï1ÔÊÐí
  IT0=1;				//ÖÐ¶Ï1 ÏÂ½µÑØ´¥·¢
	EX1=1;
	IT1=1;
	P0=0xff;
	delay(50000);
}
void exter0()interrupt 0 //Íâ²¿ÖÐ¶Ï0
{
	P0=0x6d;  //ÏÔÊ¾S successful
delay(3000);
	P0=0xff;
}
void exter1()interrupt 2 //Íâ²¿ÖÐ¶Ï1
{
	P0=0x71;  // ÏÔÊ¾F failure
delay(3000);
	P0=0xff;
}
